@extends('layout.admin')

@section('title','导航列表')

@section('content')
<style type="text/css">
    #pages li{
        background-color: #444444;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        border-right: 1px solid rgba(0, 0, 0, 0.5);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
        color: #fff;
        cursor: pointer;
        display: block;
        float: left;
        font-size: 12px;
        height: 20px;
        line-height: 20px;
        outline: medium none;
        padding: 0 10px;
        text-align: center;
        text-decoration: none;
    }
    #pages .disabled{
        color: #666666;
        cursor: default;
    }

    #pages .active{
        background:#808080;
        color:#323232;
    }

    #pages{
        height:auto;
        overflow:hidden;
        padding:0px;
        margin:0px;
    }

    #pages ul{
        padding:0px;
        margin:0px;
    }
    .a a{
        color:skyblue;
    }
</style>

<div class="mws-panel grid_8">
  <div class="mws-panel-header">
      <span><i class="icon-table"></i>导航列表</span>
  </div>
 
    <div class="mws-panel-body no-padding">
        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
          <form action="/nav/index" method="get">
      <div id="DataTables_Table_0_length" class="dataTables_length">
        <label>显示
          <select size="1" name="num" aria-controls="DataTables_Table_0">
            <option value="5" @if($request->input('num') == 5) selected @endif>5</option>
            <option value="10" @if($request->input('num') == 10) selected @endif>10</option>
            <option value="15" @if($request->input('num') == 15) selected @endif>15</option>
            <option value="20" @if($request->input('num') == 20) selected @endif>20</option>
          </select>条
        </label>
      </div>
      <div class="dataTables_filter" id="DataTables_Table_0_filter">
        <label>查询:
          <select class="small" name="type">
              <option value="title" @if($request->input('type') == "title") selected @endif>导航名称</option>
              <option value="description" @if($request->input('type') == "description") selected @endif>导航描述</option>
              <option value="type" @if($request->input('type') == "link") selected @endif>导航链接</option>
              <option value="sort" @if($request->input('type') == "sort") selected @endif>排序</option>
          </select>
          <input aria-controls="DataTables_Table_0" name="keyword" value="{{$request->input('keyword')}}" type="text">&nbsp;&nbsp;<button class="btn btn-info"><i class="icon-search"></i></button>
        </label></div>
    </form>
        <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
          <thead>
              <tr>
                <!-- <th class="checkbox-column">
                  <input type="checkbox"></th> -->
                <th>ID</th>
                <th>导航名称</th>
                <th>导航描述</th>
                <th>导航链接</th>
                <th>导航排序</th>
                <th>操作</th>
              </tr>
          </thead>
        <form action="">
        <tbody role="alert" aria-live="polite" aria-relevant="all">
          @foreach($nav as $k=>$v)
          <tr class="odd">
            <!-- <td class="checkbox-column"> -->
            <!-- <input type="checkbox" name="dels" value="{{$v->id}}"></td> -->
            <td class=" ">{{$v->id}}</td>
            <td class=" ">{{$v->title}}</td>
            <td class=" ">{{$v->description}}</td>
            <td class=" ">{{$v->link}}</td>
            <td class=" ">{{$v->sort}}</td>
            <td class=" "><a href="/nav/edit?id={{$v->id}}"> 修改</a>&nbsp;&nbsp;&nbsp;<a href="/nav/delete?id={{$v->id}}">删除</a></td>
          </tr>
          @endforeach
        </tbody>
        </form>
      </table>

        <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">
        <div id="pages">
        {!! $nav->appends($request->all())->render() !!}
        </div>
      </div>

  </div>
  </div>
  <script src="/admins/js/libs/jquery-1.8.3.min.js"></script>
</div>
<script src="/admins/js/reply.js"></script>
@endsection
